<template>
  <div>
    <div class="container" style="overflow:hidden">
      <div class="left_box_Dynamic">
        <Title />
        <Talkbox  v-on:changelNum="changefun" />
        <Talk :Higet="num" />
      </div>
      <div class="right_box_Dynamic">
        <HotPic />
      </div>
    </div>
  </div>
</template>

<script>
import Title from "./comps/Title";
import Talkbox from "./comps/Talkbox";
import Talk from "./comps/Talk";
import HotPic from "./comps/HotTopic";
export default {
  data() {
    return {
      num: 0,
      Higet: 1130,
    };
  },
  components: {
    Title,
    Talkbox,
    Talk,
    HotPic,
  },
  methods: {
    handleScroll() {
      if (window.pageYOffset > this.Higet) {
        this.num++;
        this.Higet+=800;
      }

    },
    changefun(e){
      // console.log(e);
      this.num =0; 
      this.Higet= 1130
    }
  },
  mounted() {
    document.addEventListener("scroll", this.handleScroll, true);
  },
};
</script>

<style scoped>
.left_box_Dynamic {
  width: 70%;
  height: auto;
  /* border: 1px solid black; */
  float: left;
  /* margin-top: 70px; */
}
.right_box_Dynamic {
  width: 25%;
  height: auto;
  /* border: 1px solid #f8f8f9; */
  float: left;
  /* margin-top: 70px; */
  margin-left: 5%;
}
</style>
